JIAFU_CLIENT_FILE = '/home/ubuntu/jiafu_client/download/jiafu_client_version.ini'
CPS_CLIENT_FILE = '/home/ubuntu/jiafu_client/download/cps_client_version.ini'
LOG_DIR = 'log/'
REDIS_URL = 'redis://:@localhost:6379/0'

# websocket
GZ_WS_BASE_URL = 'ws://front.jiafu.one/ws/'
HK_WS_BASE_URL = 'ws://trader.jiafu.one/ws/'
WS_DEPTH = 'depth/'
WS_TRADE = 'trade/'
WS_USER = 'user/'

# rest
GZ_REST_BASE_URL = 'http://front.jiafu.one/trade/'
HK_REST_BASE_URL = 'https://trader.jiafu.one/trade/'


ORDER_STATUS_STOPPED = 'STOPPED'
ORDER_STATUS_RUNNING = 'RUNNING'
HTTP_TIMEOUT = 2
ORDER_TYPE_LIMIT = 'LIMIT'
ORDER_STATUS_DONE = "DONE"
ORDER_STATUS_FAILLED = "FAILED"
ORDER_STATUS_CREATE = "CREATE"

WS_USER = "600001"
WS_USER_PWD = "123456"


import os.path
bitmex_project_tag = "bitmex"
project_logs = os.path.join(os.path.dirname(os.path.dirname(__file__)), "log")
project_root = os.path.dirname(os.path.dirname(__file__))
python_path = None


try:
    from . xconstant import *
except:
    pass

if not python_path:
    raise Exception("must give python_path")

runbitmex_command_prefix = python_path + " manage.py runbitmex --action account --account "